package com.chenliang.demo.web.controller;

import com.chenliang.demo.client.vo.DemoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @program: bob
 * @description:
 * @author: chenLiang
 * @create: 2022-07-09 15:27
 */
@RestController
@RequestMapping("/demo")
@Api("demo")
public class DemoController {

    
    @Value("${server.port}")
    private String port;

    @GetMapping("/get")
    @ApiOperation("测试swagger是否启用")
    public DemoVO  get(){
        DemoVO demoVO = new DemoVO();
        demoVO.setValue(port);
        return demoVO;
    }
}
